import { Image, ImageProps } from 'antd'
import { useContext } from 'react'
import { AppContext, isExternal } from '..'
interface ProImagePorps extends ImageProps {

}
const ProImage = ({ src, ...rest }: ProImagePorps) => {
    const { fileBasicUrl } = useContext(AppContext);
    if (!isExternal(src)) {
        src = fileBasicUrl + src
    }
    return <Image {...rest} src={src} />
}
export default ProImage